from typing import Union

objects = [0, 1, [], 4, 5, "", None, 8]
print(list(filter(None, objects))) #[item for item in iterable if item]
#[1,4,5,8]
print(isinstance(0,(int,float)))